#include "yuvspec.h"



YUVSpec::YUVSpec(int width, int height, AVPixelFormat format):width(width),height(height),format(format)
{
    // 计算imageSize
    imageSize = av_image_get_buffer_size(format,width,height,1);
}

int YUVSpec::getImageSize() const
{

    return imageSize;
}

int YUVSpec::getWidth() const
{

    return width;
}

int YUVSpec::getHeight() const
{

    return height;
}

AVPixelFormat YUVSpec::getFormat() const
{

    return format;
}
